<?php
/**
 * Created by PhpStorm.
 * User: shkj
 * Date: 2020/8/29
 * Time: 23:13
 */

namespace app\api\validate;


use think\facade\Request;
use think\Validate;

class BaseValidate extends Validate
{

    public function goCheck(){
        //获取http传入的参数
        //对这些参数做检验
        $params = Request::param();

        $result = $this->batch()->check($params);

        if(!$result){
        return false;

        }else{
            return true;
        }
    }

    protected function isNotEmpty($value, $rule='', $data='', $field='')
    {
        if (empty($value)) {
            return false;
        } else {
            return true;
        }
    }
}